package day15;

import java.util.ArrayList;
import java.util.List;

public class testgenerics01 {
    public static void main(String[] args) {
        List list=new ArrayList();
//        list.add("赵彪");
//        list.add("小碧载仔");
//        list.add(250);
        System.out.println(list);
        List<String> list2=new ArrayList();
        list2.add("哈哈哈");
        list2.add("呵呵呵");
        list2.add("嘿嘿嘿");
        System.out.println(list2);
        List<Long> list3=new ArrayList<>();
        list3.add(455L);
        list3.add(489544L);
        list3.add(78412L);
        System.out.println(list3);
        String[] a={"张大彪","李云龙","魏和尚"};
        print(a);
        Integer[] b={9,8,5,58,79};
        print(b);
        Double[] c={2.5,4.6,8.999,4.111};
        print(c);
    }

    private static<E> void print(E[] c) {
        for (E g:c){
            System.out.print(g+",");
        }
        System.out.println();
    }
}
